<?php
/**
*	系统里默认的系统日志模块的
*/
namespace Rainrock\Framework\Module;


use Rainrock\Framework\kernel\core\ModuleInfo;
use Rainrock\Framework\kernel\core\ModuleFields;

class SyslogModuleInfo extends ModuleInfo{
	
	protected function initModule(){
		 $this->setName('系统日志');
		 $this->setNum('syslog');
		 
		 $this->addFields(ModuleFields::get('type')
			->setName('类型')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 
		 $this->addFields(ModuleFields::get('remark')
			->setName('内容说明')
			->setLen(500)
			->setAlign('left')
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('optdt')
			->setName('操作时间')
			->setType('datetime')
		 );
	
	
		 $this->addFields(ModuleFields::get('lastdt')
			->setName('最后时间')
			->setType('datetime')
		 );
		
		 $this->addFields(ModuleFields::get('result')
			->setName('运行结果')
			->setLen(500)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('level')
			->setName('级别')
			->setLen(1)
			->setDev(0)
			->setIspx(1)
			->setIslb(0)
			->setData('0|普通,2|队列|blue,3|错误|red')
			->setFieldstype('select')
			->setType('tinyint')
		 );
		 
		 $this->addFields(ModuleFields::get('ip')
			->setName('IP')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('web')
			->setName('浏览器')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 
		 $this->addFields(ModuleFields::get('device')
			->setName('设备号')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('optid')
			->setName('操作人ID')
			->setIslb(0)
			->setDev(0)
			->setType('int')
		 );
		 
		 $this->addFields(ModuleFields::get('optname')
			->setName('操作人')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('url')
			->setName('相关地址')
			->setLen(300)
			->setIslb(0)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('id')
			->setName('ID')
			->setIsfields(0)
			->setIspx(1)
			->setIslu(0)
			->setType('int')
		 );

	}
	
}